package com.wf.course.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.utils.page.PageBean;
import com.wf.course.dao.IMemberChildrenMapper;
import com.wf.course.model.member.MemberChildren;
import com.wf.course.service.IMemberChildrenService;

@Service
@Transactional(rollbackFor=Exception.class)
public class IMemberChildrenServiceImpl implements IMemberChildrenService{
	
	@Autowired
	private IMemberChildrenMapper mapper;

	@Override
	public void indexInfo(PageBean<MemberChildren> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(this.mapper.queryList(pageBean));
		pageBean.setTotalCount(this.mapper.getTotalCount(pageBean).intValue());
	}

	@Override
	public void saveOrUpdateMemberChildren(MemberChildren children) {
		// TODO Auto-generated method stub
		this.mapper.saveMemberChildren(children);
	}

	@Override
	public MemberChildren queryMemberChildrenById(Integer id) {
		// TODO Auto-generated method stub
		return this.mapper.queryMemberChildrenById(id);
	}

	@Override
	public void deleteById(Integer id) {
		// TODO Auto-generated method stub
		this.mapper.deleteById(id);
	}

	@Override
	public List<MemberChildren> querychildren(){
		return this.mapper.queryMemberChildren();
	}
	
}
